package com.minhua.jijiehao2.mainframe.mine.problemactivity.impl

import com.minhua.jijiehao2.bean.BaseBean
import com.minhua.jijiehao2.bean.QuestionBean
import com.minhua.jijiehao2.http.*
import com.minhua.jijiehao2.mainframe.mine.problemactivity.imp.IProblemModel

class ProblemModel : IProblemModel {
    override fun getProblemList(map: ParamsMap, callBack: CallBack<List<QuestionBean>>) {
        HttpController<List<QuestionBean>>().doHttp(
                ApiClient.getInstance().api.getProblemList(map.toRequestBody()),
                object : BaseSubscriber<List<QuestionBean>>() {
                    override fun dealData(t: BaseBean<List<QuestionBean>>) {
                        super.dealData(t)
                        callBack.onSuccess(t)
                    }
                }
        )
    }
}